package com.yld.demo.config;

import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @version 1.0
 * @description：TODO
 * @author：侯泽艺
 * @date 2023/3/24 10:11
 */
@Configuration
public class KafkaInitialConfiguration {
    // 创建一个名为test的Topic并设置分区数为3，分区副本数为3
    @Bean
    public NewTopic initialTopic() {
        return new NewTopic("test", 3, (short) 3);
    }
}
